package ar.edu.utn.frba.disenio.arena;

import org.uqbar.arena.actions.MessageSend;
import org.uqbar.arena.layout.HorizontalLayout;
import org.uqbar.arena.layout.VerticalLayout;
import org.uqbar.arena.widgets.Button;
import org.uqbar.arena.widgets.Label;
import org.uqbar.arena.widgets.Panel;
import org.uqbar.arena.windows.Window;
import org.uqbar.arena.windows.WindowOwner;

@SuppressWarnings("serial")
public class OkWindow extends Window<Object>{
    
	private String mensaje;
	
	public OkWindow(WindowOwner owner, String msj) {
		super(owner, null);
        this.setTitle("Aterrizar.com");
        this.mensaje = msj;
	}

	
    @Override
    public void createContents(Panel mainPanel) 
    {
        Panel panel = new Panel(mainPanel);
        panel.setLayout(new VerticalLayout());

        new Label(panel)
        .setText(this.mensaje)
        .setFontSize(11)
        .setHeigth(40);
        
        Panel actionPanel = new Panel(mainPanel);
        actionPanel.setLayout(new HorizontalLayout());
        
        new Button(actionPanel)
        .setCaption("Seguir Buscando")
        .onClick(new MessageSend(this,"close"));

    }
}

